//
// Created by wangjunjun on 2024/3/13.
//
/*
*********************************
*@author: junjunwang@wlrobo.com
*@brief:  通用类接口
*@version: 1.0.0
*@date: 2024/3/13 16:18
*********************************/
#ifndef GENERIC_H
#define GENERIC_H
#include "../log/log.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <ctime>
#include <string>
#include <map>
class CGeneric {
public:
    CGeneric();
    ~CGeneric();

public:

    //创建含有DogSn数据类型的目录
    void createDirectory(std::string dogSn, std::string dataType);
    //创建目录
    bool dirIsExists(const std::string &path);
    std::string GetPathFile(const std::string &dataType);
    std::string GetTimeStamp();
private:
    std::string getCurrentTime(); //获取时间戳函数
private:
    std::string  m_TimeStr; //时间字符串
    //std::map查询　
    std::map <std::string, std::string> m_DataMap;
    std::mutex m_Mtx; //读取共享锁
};


#endif //TIMER_H
